package it.fc.action.users;

import it.fc.action.FcAction;
import it.fc.bean.UserBean;
import it.fc.service.interfaces.IDbService;

import java.util.ArrayList;
import java.util.List;

import com.opensymphony.xwork2.Preparable;

public class ToListUser extends FcAction implements Preparable {

    private static final long serialVersionUID = 8248959670668521650L;

    private List<UserBean>    users            = new ArrayList<UserBean>();

    @Override
    public void prepare() throws Exception {

        IDbService dbManager = getDbService();
        setUsers(dbManager.getUsers());
    }

    public void setUsers(List<UserBean> users) {
        this.users = users;
    }

    public List<UserBean> getUsers() {
        return users;
    }

}
